﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="stockOutOrder.aspx.cs" Inherits="WebSite.admin.warehouse.stockOutOrder" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head id="Head1" runat="server">
     <title></title>
     <link href="../css/skin.css" rel="stylesheet" type="text/css" />
     <script language="javascript" type="text/javascript">

         function openModelWindow() {

             var code = document.getElementById( "Form2_ctl00_txtStockOrderCode" ).value;
             X( 'Window1' ).box_show( '/admin/warehouse/selectStockGoodsList.aspx?code=' + code, '选择商品' );
         }
          
     </script>
</head>
                                                
<body  bgcolor="#F1F4F7">
    <form id="form1" runat="server">
      <ext:PageManager ID="PageManager1" runat="server" />

         
      <ext:Button ID="btnSelectGoods" runat="server" OnClientClick="openModelWindow();"   EnablePostBack="false" Text="选择商品">  </ext:Button> 

    
      <ext:Grid ID="Grid1" Title="出货单商品" PageSize="50" ShowBorder="false"  
          CssClass="x-form-item"  Height="150px"  AllowPaging="false" 
          SortColumn="goodsName" SortDirection="ASC"     
                        ShowHeader="true" runat="server" 
          EnableCheckBoxSelect="false"   AllowSorting="true"    IsDatabasePaging="false" 
                        DataKeyNames="id,goodsId" OnSort="Grid1_Sort" 
          EnableRowNumber="True" onrowcommand="Grid1_RowCommand">
        <Columns>
             <ext:BoundField Width="160" ColumnID="goodsCode" SortField="goodsCode" DataField="goodsCode" DataFormatString="{0}"
                HeaderText="商品编号" />
           <ext:BoundField Width="260px" ColumnID="goodsName" SortField="goodsName" DataField="goodsName" DataFormatString="{0}"
                HeaderText="商品名称" />
        <ext:BoundField Width="200px" ColumnID="modelTypeName" SortField="modelTypeName" DataField="modelTypeName" DataFormatString="{0}"
                HeaderText="商品型号" />
           <ext:BoundField Width="100px" ColumnID="goodsStockPrice" SortField="goodsStockPrice" DataField="goodsStockPrice" DataFormatString="{0}"
                HeaderText="采购价" />
             <ext:BoundField Width="100px" ColumnID="goodsCount" SortField="goodsCount" DataField="goodsCount" DataFormatString="{0}"
                HeaderText="数量" />
          <ext:BoundField Width="100px" ColumnID="sumStockPrice" SortField="sumStockPrice" DataField="sumStockPrice" DataFormatString="{0}"
                HeaderText="总采购价" />
        <ext:WindowField Width="60px" WindowID="Window2" HeaderText="" Text="修改数量"   ToolTip="修改数量" DataIFrameUrlFields="id,goodsStockPrice,goodsCount"
                    DataIFrameUrlFormatString="stockGoodsAttributeEdit.aspx?id={0}&price={1}&count={2}" Title="修改数量"
                    IFrameUrl="~/alert.aspx" />
       <ext:LinkButtonField ConfirmText="你确定要删除吗？" ConfirmTarget="Top" ColumnID="lbfDeleted"
                Width="50px" CommandName="deleted" Text="删除" />



        </Columns>
    </ext:Grid>

           <ext:form ID="Form2" runat="server" BodyPadding="5px" 
            EnableBackgroundColor="true" Title="" ShowHeader="false" >
            <Rows>
            <ext:FormRow>
                      <Items>
                      <ext:TextBox ID="txtStockOrderCode" Label="出货单号" runat="server" Readonly="true"></ext:TextBox>
   
     
                      </Items>
            </ext:FormRow>
              
                 <ext:FormRow  ColumnWidths="50% 50%">
                <Items >
                        <ext:DropDownList id="ddlCompanyList" runat="server" Label="选择采购商" 
                            ShowRedStar="true" AutoPostBack="true" Required="true" 
                             CompareOperator="NotEqual" CompareValue="-1" CompareType="String"
                            OnSelectedIndexChanged="ddlCompanyList_SelectedIndexChanged"></ext:DropDownList>
                         <ext:TextBox ID="txtAddress" runat="server" Required="true" ShowRedStar="true" Label="详细地址"></ext:TextBox>
                </Items>
            </ext:FormRow>



                  <ext:FormRow  ColumnWidths="25% 25% 25% 25%">
                 <Items>
                  <ext:TextBox ID="txtLinker" ShowRedStar="true" Required="true" runat="server" Label="联系人"></ext:TextBox>
                     <ext:TextBox ID="txtLinkerPhone" ShowRedStar="true" Required="true" runat="server" Label="联系电话"></ext:TextBox>
                     <ext:DatePicker ID="dpkSendDate" Width="100px" Label="送货日期" runat="server">
                    </ext:DatePicker>
                   <ext:Label ID="Label3"   runat="server" Text="&nbsp;"></ext:Label>
                 </Items>
                 </ext:FormRow>
 
              <ext:FormRow>
               <Items>
                      <ext:TextBox ID="txtRemark" runat="server" Label="备注" ></ext:TextBox>  
               </Items>
             </ext:FormRow>

                 <ext:FormRow>
                  <Items>
                <ext:Button ID="btnSubmitOrder" Text="确认下单"  CssClass="mleft mright" 
                          ValidateTarget="Parent" runat="server" ValidateForms="Form2" 
                          ConfirmText="确认要提交吗？" OnClick="btnSubmitOrder_Click"    ></ext:Button>
                     </Items>
             </ext:FormRow>
                </Rows>
                </ext:form>

                     <ext:Window ID="Window1" Title="选择商品" Popup="false" EnableIFrame="true" IFrameUrl="about:blank"
        Target="Parent" runat="server"   CloseAction="HidePostBack" IsModal="true" Width="800px"
        EnableConfirmOnClose="true"  OnClose="Window1_Close" Height="500px">
    </ext:Window>

          <ext:Window ID="Window2" Title="修改采购价与数量" Popup="false" EnableIFrame="true" IFrameUrl="about:blank"
        Target="Parent" runat="server"   CloseAction="HidePostBack" IsModal="true" Width="300px"
        EnableConfirmOnClose="true"  OnClose="Window2_Close" Height="200px">
    </ext:Window>


    </form>
</body>
</html>

